﻿using System;
using System.Collections;
using Microsoft.TeamFoundation.WorkItemTracking.Client;

namespace CodePlex.TeamFoundation.Adapters.WorkItemTracking
{
  /// <summary>
  /// Interface for 
  /// Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem
  /// </summary>
  public interface IWorkItem
  {
    int AreaId { get; set; }
    string AreaPath { get; set; }
    int AttachedFileCount { get; }
    AttachmentCollection Attachments { get; }
    string ChangedBy { get; }
    DateTime ChangedDate { get; }
    string CreatedBy { get; }
    DateTime CreatedDate { get; }
    string Description { get; set; }
    string DisplayForm { get; }
    int ExternalLinkCount { get; }
    FieldCollection Fields { get; }
    string History { get; set; }
    int HyperLinkCount { get; }
    int Id { get; }
    bool IsDirty { get; }
    bool IsOpen { get; }
    bool IsPartialOpen { get; }
    bool IsReadOnlyOpen { get; }
    int IterationId { get; set; }
    string IterationPath { get; set; }
    LinkCollection Links { get; }
    string NodeName { get; }
    Project Project { get; }
    string Reason { get; set; }
    int RelatedLinkCount { get; }
    int Rev { get; }
    DateTime RevisedDate { get; }
    int Revision { get; }
    RevisionCollection Revisions { get; }
    string State { get; set; }
    WorkItemStore Store { get; }
    string Title { get; set; }
    WorkItemType Type { get; }
    Uri Uri { get; }

    //object this[CoreField id] { get; set; }
    //object this[string name] { get; set; }

    event WorkItemFieldChangeEventHandler FieldChanged;

    IWorkItem Copy();
    IWorkItem Copy(WorkItemType targetWIT);
    string GetNextState(string action);
    bool IsValid();
    void Open();
    void PartialOpen();
    void Reset();
    void Save();
    void SyncToLatest();
    ArrayList Validate();
  }
}
